﻿@model System.Collections.Generic.List<CommerceOne.Models.Entities.Address>

@if (Model != null)
{
    var index = 0;
    foreach(var item in Model)
    {
        var style = "address";
        var remain = 0;
        if (index == 0) { style += " first_item"; }
        if (index == Model.Count - 1) { style += " last_item"; } 
        Math.DivRem(index,2, out remain);
        if (remain == 0) { style += " item"; }
        else  { style += " alternate_item"; }
        
        <ul class="@style">
            <li class="address_title">@item.AddressTitle</li>
            <li><span class="address_name">@item.Name </span></li>
            <li><span class="address_address1">@item.AddressLine1</span></li>
            <li><span class="address_address2">@item.AddressLine2</span></li>
            <li><span class="">@item.PostalCode </span><span class="address_city">Ha Noi </span></li>
            <li><span class="">Vietnam </span></li>
            <li><span class="address_phone">09021998576 </span></li>
            <li class="address_update"><a href="http://livedemo00.template-help.com/prestashop_34916/address.php?id_address=33"
                title="Update">Update</a></li>
            <li class="address_delete"><a href="http://livedemo00.template-help.com/prestashop_34916/address.php?id_address=33&amp;delete"
                onclick="return confirm('Are you sure?');" title="Delete">Delete</a></li>
        </ul>
        }
    }

